#!/usr/bin/env python3

path="hw/xfree86/os-support/linux/lnx_init.c"
with open(path) as f:
    txt = f.read()
    pos = txt.find("xf86OpenConsole(void)")
    pos = txt.find('{', pos)+1
with open(path,"w") as f:
    f.write(
        txt[:pos]+"\nreturn;//HACK by ZSP\n"+txt[pos:]
    )
